package Month07.day22;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
//import java.util.logging.SimpleFormatter;
public class DemoDate {
    public static void main(String[] args) throws ParseException {
        Date date = new Date();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd  HH-mm-ss");
        String sdf = simpleDateFormat.format(date);
        System.out.println(sdf);
        String str = "1997-09-01";
        SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy=MM=dd");
        Date date1 = simpleDateFormat1.parse(str);
        System.out.println(date1);
    }
}
